# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=template-glib
pkgver=3.36.1
pkgrel=1
pkgdesc="A templating library for GLib"
url="https://gitlab.gnome.org/GNOME/template-glib"
arch=(loong64 x86_64)
license=(LGPL)
depends=(glib2 gobject-introspection-runtime)
makedepends=(git meson vala gobject-introspection gtk-doc)
provides=(libtemplate_glib-1.0.so)
_commit=f7c21273599381494bc8d9b0633b93e14586471a  # tags/3.36.1^0
source=("git+https://gitlab.gnome.org/GNOME/template-glib.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
